﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using YouxinHelper.Helper.Currency;

namespace YouxinHelper.Youxin
{
    class YouxinHelper
    {/// <summary>
    ///  刷新cos日志
    /// </summary>
    /// <returns></returns>
        public static string ReflushCosLog() {

            Youxin.StaticValue.CosplayList = FileHelper.ReadAllLine(Youxin.StaticValue.CosplayFilebin);
            int Randomcount = new Random().Next(Youxin.StaticValue.CosplayList.Count);
            string Url = Youxin.StaticValue.CosplayList[Randomcount];
            Youxin.StaticValue.CosplayList.RemoveAt(Randomcount);//删除第3行
            FileHelper.WriteUTF8List(Youxin.StaticValue.CosplayFilebin, Youxin.StaticValue.CosplayList);
            return Url;
        }
        /// <summary>
        /// 刷新图库日志yx
        /// </summary>
        /// <returns></returns>
        public static string ReflushPicLog()
        {

            Youxin.StaticValue.PicList = FileHelper.ReadAllLine(Youxin.StaticValue.PicFilebin);
            int Randomcount = new Random().Next(Youxin.StaticValue.PicList.Count);
            string Url = Youxin.StaticValue.PicList[Randomcount];
            Youxin.StaticValue.PicList.RemoveAt(Randomcount);//删除第3行
            FileHelper.WriteUTF8List(Youxin.StaticValue.PicFilebin, Youxin.StaticValue.PicList);
            return Url;
        }
    }
}
